-
-
Notifications
You must be signed in to change notification settings - Fork 18
feat: add devcontainer configuration and proxy setup for API requests #1473
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR introduces devcontainer support and configures a proxy for frontend API requests. The changes enable development in a containerized environment and route API calls through a proxy to handle cross-origin requests.
- Adds proxy configuration to route
/api/**requests to an external API endpoint - Updates Angular development server configuration to use the proxy and bind to a specific host
- Introduces devcontainer configuration using a TypeScript/Node.js image for consistent development environments
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| frontend/src/proxy.conf.json | New proxy configuration file that routes API requests to the external rocketadmin.com endpoint |
| frontend/angular.json | Updates Angular dev server configuration to use the proxy and bind to 127.0.0.1 |
| .devcontainer/devcontainer.json | Adds devcontainer configuration with Node.js 22 TypeScript image for containerized development |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -0,0 +1,6 @@ | |||
| { | |||
| "/api/**": { | |||
| "target": "https://app.rocketadmin.com/api/", | |||
Copilot
AI
Dec 15, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The proxy target URL appears to have a double path issue. The target is set to "https://app.rocketadmin.com/api/" but the context is "/api/**". This means requests to "/api/endpoint" will be proxied to "https://app.rocketadmin.com/api/api/endpoint" with a duplicated "/api" path segment. The target should likely be "https://app.rocketadmin.com" without the "/api/" suffix.
| "target": "https://app.rocketadmin.com/api/", | |
| "target": "https://app.rocketadmin.com", |
| { | ||
| "/api/**": { | ||
| "target": "https://app.rocketadmin.com/api/", | ||
| "secure": false |
Copilot
AI
Dec 15, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Setting "secure" to false disables SSL certificate verification, which can expose the application to man-in-the-middle attacks. Unless there's a specific reason for this (e.g., self-signed certificates in development), this should be set to true for security best practices, especially when connecting to a production API endpoint.
| "secure": false | |
| "secure": true |
| "options": { | ||
| "buildTarget": "dissendium-v0:build" | ||
| "buildTarget": "dissendium-v0:build", | ||
| "host": "127.0.0.1", |
Copilot
AI
Dec 15, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Binding the development server to "127.0.0.1" may prevent access from outside the container in a devcontainer environment. For devcontainer usage, consider using "0.0.0.0" as the host to allow connections from the host machine, or omit the host configuration to use Angular's default behavior.
| "host": "127.0.0.1", | |
| "host": "0.0.0.0", |
No description provided.